/**
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import '~/styles/variables.scss';

.tip {
  background-color: $md-green-50;
  border-radius: 8px;
  padding: 9px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  @media screen and (min-width: #{$containerWidth + 1px}) {
    padding: 16px 24px 24px 16px;
  }

  .textBox {
    display: flex;
  }

  .icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;

    @media screen and (min-width: #{$containerWidth + 1px}) {
      flex: 0 0 24px;
      width: 24px;
      height: 34px;
    }

    svg {
      display: block;
      width: 11px;
      height: 11px;
      path {
        fill: $c-text;
      }

      @media screen and (min-width: #{$containerWidth + 1px}) {
        width: 14px;
        height: 14px;
      }
    }
  }

  .text {
    font-size: 14px;
    line-height: 28px;
    padding-right: 8px;

    @media screen and (min-width: #{$containerWidth + 1px}) {
      font-size: 18px;
      line-height: 35px;
      padding-right: 16px;
    }
  }

  .button {
    margin-top: 4px;

    @media (hover: hover) {
      &:hover {
        background-color: $c-main;
        color: $md-white;

        svg path {
          fill: $md-white;
        }
      }
    }

    &:active {
      background-color: $c-main;
      span {
        color: $c-bg;
        @media screen and (min-width: #{$containerWidth + 1px}) {
          color: $md-white;
        }
      }
    }
  }
}

:global(.isTouch) {
  .tip {
    .button:hover {
      background-color: transparent;
      span {
        color: $c-main;
      }
    }

    .button:active {
      background-color: $c-main;
      span {
        color: $c-bg;
        @media screen and (min-width: #{$containerWidth + 1px}) {
          color: $md-white;
        }
      }
    }
  }
}
